3.580 \(\int (c+d x^{-1+n}) \, dx\)

Optimal. Leaf size=12 \[ c x+\frac{d x^n}{n} \]

[Out]

c*x + (d*x^n)/n

________________________________________________________________________________________

Rubi [A]  time = 0.0028014, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 0, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ c x+\frac{d x^n}{n} \]

Antiderivative was successfully verified.

[In]

Int[c + d*x^(-1 + n),x]

[Out]

c*x + (d*x^n)/n

Rubi steps

\begin{align*} \int \left (c+d x^{-1+n}\right ) \, dx &=c x+\frac{d x^n}{n}\\ \end{align*}

Mathematica [A]  time = 0.0013776, size = 12, normalized size = 1. \[ c x+\frac{d x^n}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[c + d*x^(-1 + n),x]

[Out]

c*x + (d*x^n)/n

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 13, normalized size = 1.1 \begin{align*} cx+{\frac{d{x}^{n}}{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(c+d*x^(-1+n),x)

[Out]

c*x+d*x^n/n

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(c+d*x^(-1+n),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.50071, size = 36, normalized size = 3. \begin{align*} \frac{c n x + d x x^{n - 1}}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(c+d*x^(-1+n),x, algorithm="fricas")

[Out]

(c*n*x + d*x*x^(n - 1))/n

________________________________________________________________________________________

Sympy [A]  time = 0.057868, size = 15, normalized size = 1.25 \begin{align*} c x + d \left (\begin{cases} \frac{x^{n}}{n} & \text{for}\: n - 1 \neq -1 \\\log{\left (x \right )} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(c+d*x**(-1+n),x)

[Out]

c*x + d*Piecewise((x**n/n, Ne(n - 1, -1)), (log(x), True))

________________________________________________________________________________________

Giac [A]  time = 1.04143, size = 16, normalized size = 1.33 \begin{align*} c x + \frac{d x^{n}}{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(c+d*x^(-1+n),x, algorithm="giac")

[Out]

c*x + d*x^n/n